package com.pkx.cloud.fse7.dms.openrecord.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.openrecord.service.OpenRecordYearService;
import com.pkx.cloud.whzx.comn.ORpose;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *  控制器
 *
 * @author chenwg
 * @since 2020-10-14
 */
@RestController
@RequestMapping("/dms/open-record-year")
@Api(value = "开门记录-按年", tags = "开门记录-按年")
@Slf4j
@ORpose
public class OpenRecordYearController {

    @Autowired
    private OpenRecordYearService openRecordYearService;

    @ApiOperation("分页列表")
    @GetMapping("/page")

    public Page page(Page page,String devName) {
        return openRecordYearService.pageList(page,devName);
    }

    @ApiOperation("列表")
    @GetMapping("/list")
    public List list() {
        return openRecordYearService.listByEntity();
    }
}
